
#ifndef _AUDIOCORE_H
#define	_AUDIOCORE_H

#include <string>

//macros used for vorbis read function.
//Specifies big or little endian byte packing. 0 for little endian, 1 for b ig endian. Typical value is 0.
#define ENDIAN 0
//Specifies word size. Possible arguments are 1 for 8-bit samples, or 2 or 16-bit samples. Typical value is 2.
#define WORD_SIZE 2
//Signed or unsigned data. 0 for unsigned, 1 for signed. Typically 1.
#define SGNED 1

namespace al
{

const long BUFFER_SIZE = (4096 * 10);
const int SINGLE_BUFFER_LIMIT = 4096;

class AudioCore
{
public:
    
    AudioCore();
    
    virtual ~AudioCore();
    
    bool Initialize();
    
    void Shutdown();
    
    void SetListener(float x, float y, float z = 0);
    
    /**
     * Checks if openal reported any errors.
     * @return 
     */
    static bool Check();
    
    /**
     * Clears of openal reported errors so that new erros are reported 
     * correctly
     */
    static void ClearErrorBuffer();
 private:
     
    static std::string ErrorStringAL(int code);
    
    static std::string ErrorStringOV(int code);
};

};

#endif	/* _AUDIOCORE_H */
